
<article class="module width_3_quarter">
  <header>
    <h3 class="tabs_involved"><a >订单列表</a> 共({{$pagers.count}})</h3>
   
     
      <ul class=" tabs">
     
        <li>根据店铺搜索：<input type="text"  name="cat_id" style="width:50px" value="店铺ID" onclick="if(this.value=='店铺ID') this.value=''"/> <input type="button" class="alt_btn" value="GO" onclick="ordrSearchByCatId()"/></li>
        <li>根据商品搜索：<input type="text"  name="goods_id" style="width:50px" value="商品ID" onclick="if(this.value=='商品ID') this.value=''"/> <input type="button" class="alt_btn" value="GO" onclick="ordrSearchByGoodsId()"/></li>
         <li><a href="admins.php?act=order_export">导出</a></li>
      </ul>
    
  </header>
  <div class="tab_container">
    <div id="tab1" class="tab_content">
      <table class="tablesorter" cellspacing="0">
        <thead>
          <tr>
            <th></th>
            <th width="240px">单号</th>
           
            <th width="340px">收货人</th>
            <th width="100px">费用</th>
            <th>支付</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
        
        {{foreach from=$order_list item=list key=key}}
        <tr class="c_tr idx_{{$key}}">
          <td><input type="checkbox"></td>
          <td>
          <table width="240px">
              <tr>
                <td colspan="2">{{$list.order_sn}}</td>
              </tr>
              {{foreach from=$list.order_goods item=s_v key=s_k}}
              <tr >
                <td width="85px"><a href="../goods.php?id={{$s_v.goods_id}}" target="_blank" title="{{$s_v.goods_name}}"><img src="../{{$s_v.goods_thumb}}" width="60"/></a></td>
                <td> {{$s_v.goods_price}} X {{$s_v.goods_number}} <br/>
                  <c class="red">{{$s_v.goods_attr}}</c>
                  <br/>
                
                </td>
              </tr>
              {{/foreach}}
            </table></td>
          
          <td>{{if $list.user}}
          email:<a href="admins.php?act=user_info&user_id={{$list.user.user_id}}">{{$list.user.email}}</a><br />
          电话:{{$list.user.info.tel}} {{$list.user.type}}
          {{else}}访客{{/if}}<br/>
            {{$list.address.addr_str}}</td>
          <td>{{$list.order_amount}}</td>
          <td>{{if $list.pay_status==2}}<b class="green">已支付</b>{{else}}未支付{{/if}}</td>
          <td></td>
        </tr>
         <tr class="c_tr idx_{{$key}}">
        	<td>其他</td>
            <td colspan="6">IP:{{$list.ip}} , OS : {{$list.os}}  时间 : {{$list.add_time}}</td>
        </tr>
        {{/foreach}}
          </tbody>
        
      </table>
    </div>
  </div>
  <!-- end of .tab_container --> 
  
</article>
{{include file="../../pages.htm"}}
<script language="javascript">
 function ordrSearchByCatId(){
	 var cat_id = $("input[name=cat_id]").val();
	 if(cat_id*1>0)
	 {
		 $("#main").load('admins.php?act=orderByCatId&cat_id='+cat_id+' #main .tab_container',{},function(res){
				$("#main").hide().fadeIn("slow");
		});
	 	//location.href = 'admins.php?act=orderByCatId&cat_id='+cat_id;
	 
	 }
	 else
	 {
		alert('请输入有效的ID');	 
	 }
	 
 }
  function ordrSearchByGoodsId(){
	 var goods_id = $("input[name=goods_id]").val();
	 if(goods_id*1>0)
	 {
		 $("#main").load('admins.php?act=orderByGoodsId&goods_id='+goods_id+' #main .module',{},function(res){
				$("#main").hide().fadeIn("slow");
		});
	 	//location.href = 'admins.php?act=orderByGoodsId&goods_id='+goods_id;
	 
	 }
	 else
	 {
		alert('请输入有效的ID');	 
	 }
	 
 }
</script>